<%@ page import="java.util.List" %>
<%@ page import="com.neuedu.entity.Emp" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<html>
<head>
    <title>Title</title>
</head>
<body>


<h3>	MVC架构1 </h3>

      <a href="<%=request.getContextPath()%>/WEB-INF/business/emp/emp_add.jsp">部门添加</a>
       <table border="1" width="100%"  cellpadding="0" cellspacing="0">
           	<tr align="center">                                                  
               		<td>empno</td>
               		<td>ename</td>
               		<td>mgr</td>
               		<td>job</td>
               		<td>hiredate</td>
               		<td>sal</td>
               		<td>comm</td>
               		<td>deptno</td>
               		<td>操作</td>
               	</tr>

  <%
	  	List<Emp> emps = (List<Emp>) request.getAttribute("emps");
		String contextPath = request.getContextPath();
		for (int i = 0; i < emps.size(); i++) {
			Emp emp = emps.get(i);
	  %>

           	<tr align="center">
               		<td> <%= emp.getEmpno()%> </td>
               		<td> <%= emp.getEname()%> </td>
               		<td> <%= emp.getJob()%> </td>
               		<td> <%= emp.getMgr()%> </td>
               		<td> <%= emp.getHiredate()%> </td>
               		<td> <%= emp.getSal()%> </td>
               		<td> <%= emp.getComm()%> </td>
               		<td> <%= emp.getDeptno()%> </td>
               		<td>               
                   		  <a href='<%=request.getContextPath()%>/emp?_type=toEdit&empno=<%=emp.getEmpno()%>'>修改</a>   &nbsp;&nbsp;&nbsp;&nbsp;
                   		  <a href='<%=request.getContextPath()%>/emp?_type=deleteById&empno=<%=emp.getEmpno()%>'>删除</a>   &nbsp;&nbsp;&nbsp;&nbsp;
                   	   </td>
               	</tr>
		   <%}%></table>



</body>
</html>
